from pydantic import BaseModel
import datetime

from .user import User

# Shared properties
class CommentBase(BaseModel):
    content: str

# Properties to receive via API on creation
class CommentCreate(CommentBase):
    job_id: int

class CommentInDBBase(CommentBase):
    id: int
    author: User
    created_at: datetime.datetime

    class Config:
        from_attributes = True

# Additional properties to return via API
class Comment(CommentInDBBase):
    pass
